from __future__ import division

def convertC(f):
    return (f-32)*(5/9)

f=raw_input()
print convertC(float(f))